package com.itheima.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.itheima.core.dao.UserDao;
import com.itheima.core.po.User;
import com.itheima.core.service.UserService;

/**
 *	@author zangye03
 *	date 2021年7月11日上午11:29:57
 *	Description	 
 *	用户Service接口实现类
 */

@Service("userService")
@Transactional(rollbackFor = Exception.class)
public class UserServiceImpl implements UserService{

	/**
	 * 注入UserDao
	 */
	@Autowired
	private UserDao userDao;

	/**
	 * 通过账号和密码查询用户
	 */
	@Override
	public User findUser(String userCode, String passWord) {
		User user = this.userDao.findUser(userCode,passWord);		
		return user;
	}
	
}
